Does anyone have a way to insert an OLE into a string? By looping through the richText chunks and using getEmbeddedOle I can extract the OLE from an attribute, but how do you inserted in a new string? This is to generate a comprehensive attribute comparison column.
SystemAdmin - Sat Mar 28 09:36:29 EDT 2009 |
|
Re: Inserting OLE's into strings dpechacek - Mon Mar 30 08:14:56 EDT 2009
I could be wrong but I think DOORS handles all OLEs as a string already.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
|
|
Re: Inserting OLE's into strings SystemAdmin - Mon Mar 30 09:27:04 EDT 2009 dpechacek - Mon Mar 30 08:14:56 EDT 2009
I could be wrong but I think DOORS handles all OLEs as a string already.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
OK, but I have an object attribute containing text and an OLE, I want to compare it with data from another attribute and display the differences as "redlined" text in a view column. Easy for just text alone, the diff function does the job. However, this does not allow the OLE to be compared or displayed. You can step through richText chunks to isolate the ole's and compare them, but how do you then display the OLE's in the view column?
|
|
Re: Inserting OLE's into strings dpechacek - Mon Mar 30 10:10:27 EDT 2009 SystemAdmin - Mon Mar 30 09:27:04 EDT 2009
OK, but I have an object attribute containing text and an OLE, I want to compare it with data from another attribute and display the differences as "redlined" text in a view column. Easy for just text alone, the diff function does the job. However, this does not allow the OLE to be compared or displayed. You can step through richText chunks to isolate the ole's and compare them, but how do you then display the OLE's in the view column?
Display the differences in chunks. For OLE parts just display it. For non-OLE parts display the differences in pieces. Remember you can do more than one display/displayRich at a time. If they're the same the pieces should line up. You could even throw the pieces into skip lists or Arrays and compare them by number of characters or something.
No one said DXL was nice. :)
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
|
|
Re: Inserting OLE's into strings SystemAdmin - Tue Mar 31 09:25:13 EDT 2009 dpechacek - Mon Mar 30 10:10:27 EDT 2009
Display the differences in chunks. For OLE parts just display it. For non-OLE parts display the differences in pieces. Remember you can do more than one display/displayRich at a time. If they're the same the pieces should line up. You could even throw the pieces into skip lists or Arrays and compare them by number of characters or something.
No one said DXL was nice. :)
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
I may well be being thick here, but can you give a line of DXL to display a chunk of RichText?
i.e replace the ????????? in the following -
RichText rt
string LocalAttrib = richTextWithOle(obj.Attrib)
for rt in LocalAttrib do
{
if(rt.isOle )
{
display ?????????
}
}
|
|
Re: Inserting OLE's into strings dpechacek - Tue Mar 31 10:18:17 EDT 2009 SystemAdmin - Tue Mar 31 09:25:13 EDT 2009
I may well be being thick here, but can you give a line of DXL to display a chunk of RichText?
i.e replace the ????????? in the following -
RichText rt
string LocalAttrib = richTextWithOle(obj.Attrib)
for rt in LocalAttrib do
{
if(rt.isOle )
{
display ?????????
}
}
Was a suggestion to look at. Not a clear solution. Looking at it, it seems you can get the OLE object using rt.getEmbeddedOle. However, we don't have an apparent way to get that into a string. Obviously DOORS handles them as a string as when you do richTextWithOle() it returns a string and when you do displayRich() on that string, it shows the OLE object.
So obviously Telelogic has a way to do this, but they don't make it known to us. I'm sure someone on here has the knowledge. Just a matter of whether they're allowed to(due to company restrictions) or willing to share.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
|
|
Re: Inserting OLE's into strings Reik_Schroeder - Tue Apr 07 06:39:13 EDT 2009 SystemAdmin - Tue Mar 31 09:25:13 EDT 2009
I may well be being thick here, but can you give a line of DXL to display a chunk of RichText?
i.e replace the ????????? in the following -
RichText rt
string LocalAttrib = richTextWithOle(obj.Attrib)
for rt in LocalAttrib do
{
if(rt.isOle )
{
display ?????????
}
}
The function string oleRtf(EmbeddedOleObject) may help you ;)
In combination with the function getEmbeddedOle mentioned by David you can do insert it.
You need to add a RTF header to the result to see the embedded OLE.
so your code becomes:
RichText rt
string LocalAttrib = richTextWithOle(obj."Object text")
for rt in LocalAttrib do {
if(rt.isOle ) {
displayRich "{\\rtf1 "(oleRtf (rt.getEmbeddedOle))"}"
}
}
Question: How do you want to compare the content of embedded OLE?
Greetings from Berlin
Reik
|
|
Re: Inserting OLE's into strings dpechacek - Tue Apr 07 09:31:02 EDT 2009 Reik_Schroeder - Tue Apr 07 06:39:13 EDT 2009
The function string oleRtf(EmbeddedOleObject) may help you ;)
In combination with the function getEmbeddedOle mentioned by David you can do insert it.
You need to add a RTF header to the result to see the embedded OLE.
so your code becomes:
RichText rt
string LocalAttrib = richTextWithOle(obj."Object text")
for rt in LocalAttrib do {
if(rt.isOle ) {
displayRich "{\\rtf1 "(oleRtf (rt.getEmbeddedOle))"}"
}
}
Question: How do you want to compare the content of embedded OLE?
Greetings from Berlin
Reik
I don't think he does Reik. Just wants to be able to skip it. Thanks for making that function known.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
|
|
Re: Inserting OLE's into strings SystemAdmin - Thu Apr 09 07:03:18 EDT 2009 Reik_Schroeder - Tue Apr 07 06:39:13 EDT 2009
The function string oleRtf(EmbeddedOleObject) may help you ;)
In combination with the function getEmbeddedOle mentioned by David you can do insert it.
You need to add a RTF header to the result to see the embedded OLE.
so your code becomes:
RichText rt
string LocalAttrib = richTextWithOle(obj."Object text")
for rt in LocalAttrib do {
if(rt.isOle ) {
displayRich "{\\rtf1 "(oleRtf (rt.getEmbeddedOle))"}"
}
}
Question: How do you want to compare the content of embedded OLE?
Greetings from Berlin
Reik
Thanks Reik, that is exactly what I needed (and I'm sure a lot of other people out there will make use of it as well, thanks for sharing.)
To answer your question - yes, I am trying to compare OLE's. I'm investigating comparing them as strings, but I've not got too far yet.
|
|
Re: Inserting OLE's into strings SystemAdmin - Wed Apr 15 07:50:07 EDT 2009
There seems to be some strange quirks to how OLE's are stored in strings, but I now have a comparison routine working and displaying OLE's in layout DXL. Thanks again.
|
|
Re: Inserting OLE's into strings lsand - Fri Oct 22 17:43:23 EDT 2010 Reik_Schroeder - Tue Apr 07 06:39:13 EDT 2009
The function string oleRtf(EmbeddedOleObject) may help you ;)
In combination with the function getEmbeddedOle mentioned by David you can do insert it.
You need to add a RTF header to the result to see the embedded OLE.
so your code becomes:
RichText rt
string LocalAttrib = richTextWithOle(obj."Object text")
for rt in LocalAttrib do {
if(rt.isOle ) {
displayRich "{\\rtf1 "(oleRtf (rt.getEmbeddedOle))"}"
}
}
Question: How do you want to compare the content of embedded OLE?
Greetings from Berlin
Reik
thanks. your code helped me too!
|
|